--record IK ani v0.1
 rollout progress "record animation" width:372 height:40
 (
 	progressBar pro "ProgressBar" pos:[4,26] width:362 height:9 color:(color 255 0 0) orient:#horizontal
 	label pro2 "" pos:[120,4] width:140 height:18
 
 ) 
 
 createdialog progress  
global c=#()
v=0
for i=1 to b.count do
 (
 at time 0(obj=snapshot b[i];obj.parent = undefined;obj.name=b[i].name;c[i]=obj;obj.pos.controller=tcb_position();obj.rotation.controller = tcb_rotation ())
   for frame=fromtime to totime by steptime do
    (
	at time frame
	 (
	  animate on
	  (
	  obj.transform=b[i].transform
	  )
	  v=v+1
	  progress.pro.value=v*100./(b.count*(((totime-fromtime)/steptime+1)))
	  pro2=(v*100./(b.count*(((totime-fromtime)/steptime+1)))) as integer			
	  progress.pro2.text="processing:" + pro2 as string + "%"
	  
     )
    )
  move obj[100,0,0]
 )
 
 
 progress.pro.value=0
 destroydialog progress